Audio-visual (AV) presentations that are coded according to the Motion Picture Expert Group (MPEG) standard ISO/IEC-14496-1, known as MPEG-4 Systems, may consist of several data streams, e.g. one or more streams for video, one or more streams for audio, and others. The audio streams may have individual, usually standardized sample rates, e.g. 8 kb/s, 16 kb/s, 22.05 kb/s, 32 kb/s, 44.1 kb/s or 48 kb/s for different types of audio streams. Further, these streams consist of packets or frames with attached time-stamps.
Reproduction of such presentations requires individual decoding units for different streams, a processing unit and one or more output units. These decoding, processing and output units may be implemented in so-called multithreading technique, using a microprocessor with operating system (OS) and application software, wherein the mentioned units are implemented as separate software partitions, also called “tasks” or “threads”. A thread is an independent unit of executable software that sequentially shares the control of the microprocessor with other threads. Since the threads are called and executed sequentially, they work asynchronously to each other, and may communicate with each other via a messaging application programming interface (API) provided by the operating system, or via function calls. Transmission of data between threads requires the data to be buffered, wherein usually synchronized FIFO-like structures are used for buffering. However, obtaining an acceptable quality of reproduction requires the output data stream, e.g. audio stream, to be continuous and complete at the output unit, i.e. any buffer underflows and buffer overflows must be prevented. To ensure constant data availability at the output unit, commonly a large FIFO buffer is used between the processing unit and the output unit.
A conventional audio processing system is shown in FIG. 1. Decoded data blocks from a source stream are read from a decoder 11 via a frame FIFO 11b into a processing unit 14 where they are processed. The processed data blocks are written to a block-organized FIFO 15 that feeds the output module 16. The output module 16 generates a continuous stream 17 of audio representation data from the data blocks that are read from the frame FIFO 15, using several decoded data blocks simultaneously. When the FIFO 15 is not full, it sends a signal 18, e.g. an exception message, to the processing unit 14. Then the processing unit 14 processes more data from its input until the FIFO 15 is full. Such system may be implemented on a real-time operating system (RTOS) or on a non-RTOS like e.g. Microsoft Windows®. In the latter case, which is preferred because it is cheaper and simpler than a RTOS, separate threads 11T,14T,16T are used for the decoder 11, the processing unit 14 and the output module 16.